#ifndef ___TRIANGULATION_SALIENCY_UTILITY_H___
#define ___TRIANGULATION_SALIENCY_UTILITY_H___
#include <Triangulation.h>

float lengthTerm(float length, float lengthThres, float alpha, float angleTerm=0.0f);

float angleTerm(float angle);

float angleTerm(Triangulation::_Internal::_edge* e1, Triangulation::_Internal::_edge* e2);

float 
pairFitness(Triangulation::_Internal::_edge* e1, Triangulation::_Internal::_edge* e2, float beta, float gamma);

vector<Triangulation::_Internal::_vertex*>
orientVertices(vector<Triangulation::_Internal::_vertex*>& vertices, CParticleF& o);

/*
Given a treble of vertices (u, v, w) with u being in the middle, compute the saliency of u.
*/
float
pointFitness(Triangulation::_Internal::_vertex* u, 
			 Triangulation::_Internal::_vertex* v,
			 Triangulation::_Internal::_vertex* w,
			 float beta, float gamma);

#endif /* ___TRIANGULATION_SALIENCY_UTILITY_H___ */